package design.a1_factory.simple;

import design.a1_factory.simple.book.Book;
import design.a1_factory.simple.book.impl.English;
import design.a1_factory.simple.book.impl.Math;

public class SimpleFactory {

	public static Book create(String name) {
		if (name.equals("math")) {
			return new Math();
		} else if (name.equals("english")) {
			return new English();
		}
		return null;
	}

}
